var isString = require('./isString')
var isNumber = require('./isNumber')

/**
 * 判断是否 Element 对象
 * @description nodeName为节点名称；nodeType [1(元素节点), 2(属性节点)]
 * @param {Object} obj
 * @returns {Boolean}
 */
function isElement(obj) {
  return !!(obj && isString(obj.nodeName) && isNumber(obj.nodeType))
}

module.exports = isElement

// const DOM = document.createElement('div')
// console.log(isElement({})) // false
// console.log(isElement(DOM)) // true
